<?php

	namespace Phptricks\system\library\basecontroller;

	/**
	 *  phptricks Framework 
	 *  link http://phptricks.net/Framework
	 *  date start 2014
	 * @access public
	 * @category Base Laibrary
	 * @version 1.0
	 */
	use Phptricks\system\core\library\library;
	use Phptricks\system\library\PhptricksExceptions\PhptricksExceptions as Exc;
	use Phptricks\system\library\configuration\configuration as configuration;
	use Phptricks\system\library\loaders\loader as loaders;
	use Phptricks\system\library\date_time\date_time as date_time;
	use Phptricks\system\library\uri\uri as URI;

	class basecontroller implements library{

		private static $_instance = null;
		public $loader;
		public $apppath;
		public $_config;
		public $syspath;
		public $datetime;
		public $_uri;
		public $date_time;

		public static function getinstance(){
			if (self::$_instance === null) {
				self::$_instance = new \Phptricks\system\library\basecontroller\basecontroller();
			}
			return self::$_instance;
		}

		public function __construct(){
			try {
				$this->loader = loaders::getinstance();
				$this->_config = new configuration();
				$this->datetime = date_time::getinstance();
				$this->apppath = \APPPATH;
				$this->syspath = \SYSTEMPATH;
				$this->_uri = URI::getinstance();
				$this->date_time = date_time::getinstance();
			} catch (\Exception $exc) {
				throw new Exc($exc->getMessage());
			}
		}

		

	}
	